package ssn.login.vo;

import java.io.Serializable;

import org.hibernate.validator.constraints.NotEmpty;

import egovframework.rte.fdl.string.EgovStringUtil;

public class LoginInfoVO implements Serializable{
	
	private static final long serialVersionUID = -5107533406970404089L;
	
	private String ssa_area_key;			// 휴개소 키
	private String ssa_area_name;			// 현장명
	@NotEmpty(message="아이디를 입력해주세요.")
	private String ssa_login_id;			// 로그인 아이디
	@NotEmpty(message="패스워드를 입력해주세요.")
	private String ssa_pass_word;			// 로그인 패스워드
	private String ssa_user_auth;			// 권한
	
	private boolean isAdmin = false;			// 권한
	private boolean loginCheck = false;
	private String referer;
	
	private String ssa_admin_id;			// 관리자 아이디
	private String ssa_admin_name;			// 관리자 이름
	private String ssa_admin_hp;			// 관리자 전화번호
	
	public void setLoginInfo(LoginInfoVO vo){
		this.ssa_area_key = vo.getSsa_area_key();
		this.ssa_area_name = vo.getSsa_area_name();
		this.ssa_login_id = vo.getSsa_login_id();
		this.ssa_user_auth = vo.getSsa_user_auth();
		this.loginCheck = vo.isLoginCheck();
		this.ssa_admin_id = vo.getSsa_admin_id();
		this.ssa_admin_name = vo.getSsa_admin_name();
		this.ssa_admin_hp = vo.getSsa_admin_hp();
	}


	public String getSsa_admin_id() {
		return ssa_admin_id;
	}

	public void setSsa_admin_id(String ssa_admin_id) {
		this.ssa_admin_id = ssa_admin_id;
	}

	public String getSsa_admin_name() {
		return ssa_admin_name;
	}




	public void setSsa_admin_name(String ssa_admin_name) {
		this.ssa_admin_name = ssa_admin_name;
	}




	public String getSsa_admin_hp() {
		return ssa_admin_hp;
	}




	public void setSsa_admin_hp(String ssa_admin_hp) {
		this.ssa_admin_hp = ssa_admin_hp;
	}




	public String getReferer() {
		return referer;
	}




	public void setReferer(String referer) {
		this.referer = referer;
	}




	public boolean isAdmin() {
		if(EgovStringUtil.isNotEmpty(ssa_user_auth) && ssa_user_auth.equals("A"))
			isAdmin = true;
		return isAdmin;
	}

	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}

	public String getSsa_area_key() {
		return ssa_area_key;
	}

	public void setSsa_area_key(String ssa_area_key) {
		this.ssa_area_key = ssa_area_key;
	}

	public String getSsa_area_name() {
		return ssa_area_name;
	}

	public void setSsa_area_name(String ssa_area_name) {
		this.ssa_area_name = ssa_area_name;
	}

	public String getSsa_login_id() {
		return ssa_login_id;
	}

	public void setSsa_login_id(String ssa_login_id) {
		this.ssa_login_id = ssa_login_id;
	}

	public String getSsa_pass_word() {
		return ssa_pass_word;
	}

	public void setSsa_pass_word(String ssa_pass_word) {
		this.ssa_pass_word = ssa_pass_word;
	}

	public String getSsa_user_auth() {
		return ssa_user_auth;
	}

	public void setSsa_user_auth(String ssa_user_auth) {
		this.ssa_user_auth = ssa_user_auth;
	}

	public boolean isLoginCheck() {
		return loginCheck;
	}

	public void setLoginCheck(boolean loginCheck) {
		this.loginCheck = loginCheck;
	}
	
	
	
}
